<meta charset="UTF-8">
<link rel="stylesheet" href="__LAY__/css/layui.css" media="all" />
<script type="text/javascript" src="__JS__/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="__LAY__/layui.js"></script>
<style>

</style>
<form class="layui-form layui-form-pane" id="commentForm" method="post" action="{:url('user/changepwd')}">
     <div class="layui-form-item ">
        <label class="layui-form-label">用户账号</label>
        {if $vo and $vo.username}
        <div class="layui-input-block">
            <input  readonly="readonly"  type="text" name="username"  value='{$vo.username|default=""}'  lay-verType="tips"   lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
             {else}
            <input name="username" value='{$vo.username|default=""}' required="required" title="请输入用户名称" placeholder="请输入用户名称" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">旧的密码</label>
        <div class="layui-input-block">
            <input type="password" name="oldpassword" value='' pattern="^\S{1,}$" required="" title="请输入旧的密码" placeholder="请输入旧的密码" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">新的密码</label>
        <div class="layui-input-block">
            <input type="password" name="password" value='' pattern="^\S{1,}$" required="" title="请输入新的密码" placeholder="请输入新的密码" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">重复密码</label>
        <div class="layui-input-block">
            <input type="password" name="repassword" value='' pattern="^\S{1,}$" required="" title="请输入重复密码" placeholder="请输入重复密码" class="layui-input">
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item" style="text-align: center!important;">
        <button class="layui-btn" type='submit'>保存数据</button>
        <a class="layui-btn layui-btn-danger cancel">取消编辑</a>
    </div>

</form>
<script>
    layui.use('layer', function(){
        var layer = layui.layer;

        $(".cancel").click(function() {
            layer.confirm('確定取消?', function(index){
                
                 parent.layer.close(parent.index);
            });
       })
    }); 
</script>
